import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

//css
import "./assets/style/base.css"
//element
import Element from 'element-ui'
import "element-ui/lib/theme-chalk/index.css"

Vue.use(Element)

// 全局注册 Markdown
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
Vue.use(mavonEditor)

//axios
// import axios from 'axios'
// Vue.prototype.$axios = axios

//请求拦截  重定向
import request from "./axios";

// 路由拦截
import './permission' 

Vue.prototype.$axios = request

//mock
//require("./mock")//引入mock数据，关闭则注释该行

//绑定title作为标题
Vue.directive('title',  function (el, binding) {
  document.title = el.dataset.title
})

Vue.config.productionTip = false

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
